The style attributes property of a style object contains six attributes that affect the drawing of a shape. Four of these attributes affect how QuickDraw GX places the geometric pen relative to the contours of a shape:
These four attributes are discussed in the next section, "Pen Placement."
There are also two style attributes that determine whether the geometric points of a shape are constrained to a grid when the shape is drawn:
You can use the center-frame, inside-frame, and outside-frame style attributes to specify where QuickDraw GX should position the pen with respect to the shape's geometry.
Figure 21 shows the results of these style attributes. Notice that QuickDraw GX considers contour direction when determining which side of a contour is the inside: the right side of the contour is the inside, while the left side of the contour is the outside.
QuickDraw GX also provides the auto-inset style attribute, which allows you to specify that QuickDraw GX should ignore contour direction when determining which side of a contour is the inside. When you set this style attribute, QuickDraw GX determines the true inside of a contour, rather than using the right side as the inside. Figure 22 shows the effect of setting the auto-inset style attribute for the shapes depicted in Figure 21 .
Figure 22 Effect of the auto-inset style attribute
When a contour crosses over itself, the results of setting the auto-inset style attribute are unpredictable, as the contour has no true inside (or, actually, has multiple true insides). For the figure-eight shape in Figure 23 , setting the gxAutoInsetStyle and the gxInsideFrameStyle style attributes could lead to one of two results.
Figure 23 Effect of the auto-inset and inside-frame style attributes for a crossed contour
| Previous | Chapter Contents | Chapter Top | Next |